<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>产品管理-{$site.SITE_INFO.name}</title>
        <php>
            $addCss="";
            $addJs="";
            $currentNav ='产品管理 > 产品列表';
        </php>
        <include file="Common:intoHead" />
    </head>
    <body>
        <div class="wrap">
            <include file="Common:head" />
            <div class="mainBody">
                <include file="Common:left" />
                <div id="Right">
                    <div class="Item hr">
                        <div class="current">产品列表</div>
                    </div>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab">
                        <thead>
                            <tr>
                                <td>产品标题</td>
                                <td>所在分类</td>
                                <td>发布时间</td>
                                <td>发布人</td>
                                <td>状态</td>
                                <td>热点推荐</td>
                                <td width="150">操作</td>
                            </tr>
                        </thead>
                        <volist name="list" id="vo">
                            <tr align="center" id="{$vo.id}">
                                <td align="left"><img src="__PUBLIC__/Img/{$vo.lang}.png"><a href="__URL__/edit?id={$vo.id}">{$vo.title}</a></td>
                                <td>{$vo.t_lx}</td>
                                <td>{$vo.published|date="Y-m-d H:i:s",###}</td>
                                <td>{$vo.aidName}</td>
                                <td><a href="javascript:void(0);" onclick="changeStatus({$vo.id},this)">{$vo.status}</a></td>
                                <td>
                                	<eq name='vo.is_recommend' value='1'>
	                                	<a href="{:U('setRecommend',['id'=>$vo[id],'value'=>0])}" class='ajax-get'  >关闭</a>
	                                	<else />
	                                	<a href="{:U('setRecommend',['id'=>$vo[id],'value'=>1])}" class='ajax-get'  >开启</a>
                                	</eq>
                                </td>
                                <td>[ <a href="__URL__/edit?id={$vo.id}&do=copy">复制 </a> ][ <a href="__URL__/edit?id={$vo.id}">编辑 </a> ] [ <a link="{:U('Product/del/',array('id'=>$vo['id']))}" href="javascript:void(0)" name="{$vo.title}" class="del">删除 </a> ]</td>
                            </tr>
                        </volist>
                        <tr><td colspan="7" align="right">{$page}</td></td></tr>


                        <tr><td colspan="7" align="left">
                            <form action="__SELF__" method="get">
                                标题：<input type="text" name="title" value="<php>echo $_GET['title'];</php>" size="30" style="margin-right: 20px;">
                                分类：<select name="cid" style="margin-right: 20px;">
                                <option value="">--请选择--</option>
                                <volist name="catlist" id="vo">
                                    <option value="{$vo.cid}">{$vo.fullname}</option>
                                </volist>
                            </select>

                                状态：<select name="status" style="margin-right: 20px;">
                                <option value="">--请选择--</option>
                                <option value="1">已发布</option>
                                <option value="0">未审核</option>
                            </select>

                                推荐：<select name="is_recommend" style="margin-right: 20px;">
                                <option value="">--请选择--</option>
                                <option value="1">已推荐</option>
                                <option value="0">未推荐</option>
                            </select>

                                <input type="submit" value="搜索">

                            </form>
                        </td></td></tr>



                    </table>
                </div>
            </div>
        </div>
        <div class="clear"></div>
        <include file="Common:foot" />
        <script type="text/javascript">
            $(function(){
                $(".del").click(function(){
                    var delLink=$(this).attr("link");
                    $this = $(this);
                    popup.confirm('你真的打算删除【<b>'+$(this).attr("name")+'</b>】吗?','温馨提示',function(action){
                        if(action == 'ok'){
                            delByLink(delLink,$this);
                        }
                    });
                    return false;
                });
            });



        </script>
    </body>
</html>
